package com.qf.mapper;

import com.qf.pojo.Categories;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CategoriesMapper {
    @Select("select * from categories where categoryid=#{id} ")
    Categories findById(Long id);

    @Insert("insert into categories value(null,#{categoryname},#{datastatus}) ")

    void addCategories(Categories categories);

//    @Insert("insert into categories(categoryname) value(#{categoryname})")
    void addCategorie(@Param("categoryname") String categoryname);


    @Select("select * from categories")
    List<Categories> findAll();

}
